Integrand size = 26, antiderivative size = 44 \[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=\sqrt {3} \arctan \left (\frac {1+x}{\sqrt {3} \sqrt {5+2 x+x^2}}\right )-\text {arctanh}\left (\sqrt {5+2 x+x^2}\right ) \]
Time = 0.20 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.25 \[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=-\sqrt {3} \arctan \left (\frac {4+2 x+x^2-(1+x) \sqrt {5+2 x+x^2}}{\sqrt {3}}\right )-\text {arctanh}\left (\sqrt {5+2 x+x^2}\right ) \]
-(Sqrt[3]*ArcTan[(4 + 2*x + x^2 - (1 + x)*Sqrt[5 + 2*x + x^2])/Sqrt[3]]) - ArcTanh[Sqrt[5 + 2*x + x^2]]
Time = 0.23 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {1358, 27, 1313, 217, 1357, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x+4}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}} \, dx\) |
\(\Big \downarrow \) 1358 |
\(\displaystyle 3 \int \frac {1}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx+\frac {1}{2} \int \frac {2 (x+1)}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 3 \int \frac {1}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx+\int \frac {x+1}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx\) |
\(\Big \downarrow \) 1313 |
\(\displaystyle \int \frac {x+1}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx-12 \int \frac {1}{-\frac {8 (x+1)^2}{x^2+2 x+5}-24}d\frac {2 (x+1)}{\sqrt {x^2+2 x+5}}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \int \frac {x+1}{\left (x^2+2 x+4\right ) \sqrt {x^2+2 x+5}}dx+\sqrt {3} \arctan \left (\frac {x+1}{\sqrt {3} \sqrt {x^2+2 x+5}}\right )\) |
\(\Big \downarrow \) 1357 |
\(\displaystyle \sqrt {3} \arctan \left (\frac {x+1}{\sqrt {3} \sqrt {x^2+2 x+5}}\right )-2 \int \frac {1}{2-2 \left (x^2+2 x+5\right )}d\sqrt {x^2+2 x+5}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \sqrt {3} \arctan \left (\frac {x+1}{\sqrt {3} \sqrt {x^2+2 x+5}}\right )-\text {arctanh}\left (\sqrt {x^2+2 x+5}\right )\) |
3.1.32.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*( x_)^2]), x_Symbol] :> Simp[-2*e Subst[Int[1/(e*(b*e - 4*a*f) - (b*d - a*e )*x^2), x], x, (e + 2*f*x)/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0]
Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e _.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Simp[-2*g Subst[Int[1/(b*d - a*e - b*x^2), x], x, Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] & & EqQ[h*e - 2*g*f, 0]
Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + ( e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Simp[-(h*e - 2*g*f)/(2*f) Int[1/ ((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] + Simp[h/(2*f) Int[(e + 2*f*x)/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c , d, e, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c *e - b*f, 0] && NeQ[h*e - 2*g*f, 0]
Time = 0.82 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.91
method | result | size |
default | \(-\operatorname {arctanh}\left (\sqrt {x^{2}+2 x +5}\right )+\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (2 x +2\right )}{6 \sqrt {x^{2}+2 x +5}}\right )\) | \(40\) |
trager | \(\operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) \ln \left (\frac {40 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )^{2} x +21 \sqrt {x^{2}+2 x +5}\, \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )+51 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x +16 \sqrt {x^{2}+2 x +5}+95 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )+14 x +38}{\operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x +x +2}\right )-\ln \left (-\frac {-40 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )^{2} x +21 \sqrt {x^{2}+2 x +5}\, \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )-29 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x +5 \sqrt {x^{2}+2 x +5}+95 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )-3 x +57}{\operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x -2}\right ) \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )-\ln \left (-\frac {-40 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )^{2} x +21 \sqrt {x^{2}+2 x +5}\, \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )-29 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x +5 \sqrt {x^{2}+2 x +5}+95 \operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right )-3 x +57}{\operatorname {RootOf}\left (\textit {\_Z}^{2}+\textit {\_Z} +1\right ) x -2}\right )\) | \(270\) |
Leaf count of result is larger than twice the leaf count of optimal. 106 vs. \(2 (37) = 74\).
Time = 0.32 (sec) , antiderivative size = 106, normalized size of antiderivative = 2.41 \[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=-\sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x + 2\right )} + \frac {1}{3} \, \sqrt {3} \sqrt {x^{2} + 2 \, x + 5}\right ) + \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} x + \frac {1}{3} \, \sqrt {3} \sqrt {x^{2} + 2 \, x + 5}\right ) + \frac {1}{2} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} {\left (x + 2\right )} + 3 \, x + 6\right ) - \frac {1}{2} \, \log \left (x^{2} - \sqrt {x^{2} + 2 \, x + 5} x + x + 4\right ) \]
-sqrt(3)*arctan(-1/3*sqrt(3)*(x + 2) + 1/3*sqrt(3)*sqrt(x^2 + 2*x + 5)) + sqrt(3)*arctan(-1/3*sqrt(3)*x + 1/3*sqrt(3)*sqrt(x^2 + 2*x + 5)) + 1/2*log (x^2 - sqrt(x^2 + 2*x + 5)*(x + 2) + 3*x + 6) - 1/2*log(x^2 - sqrt(x^2 + 2 *x + 5)*x + x + 4)
\[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=\int \frac {x + 4}{\left (x^{2} + 2 x + 4\right ) \sqrt {x^{2} + 2 x + 5}}\, dx \]
\[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=\int { \frac {x + 4}{\sqrt {x^{2} + 2 \, x + 5} {\left (x^{2} + 2 \, x + 4\right )}} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (37) = 74\).
Time = 0.29 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.45 \[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=-\sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x - \sqrt {x^{2} + 2 \, x + 5} + 2\right )}\right ) + \sqrt {3} \arctan \left (-\frac {1}{3} \, \sqrt {3} {\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}\right ) + \frac {1}{2} \, \log \left ({\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}^{2} + 4 \, x - 4 \, \sqrt {x^{2} + 2 \, x + 5} + 7\right ) - \frac {1}{2} \, \log \left ({\left (x - \sqrt {x^{2} + 2 \, x + 5}\right )}^{2} + 3\right ) \]
-sqrt(3)*arctan(-1/3*sqrt(3)*(x - sqrt(x^2 + 2*x + 5) + 2)) + sqrt(3)*arct an(-1/3*sqrt(3)*(x - sqrt(x^2 + 2*x + 5))) + 1/2*log((x - sqrt(x^2 + 2*x + 5))^2 + 4*x - 4*sqrt(x^2 + 2*x + 5) + 7) - 1/2*log((x - sqrt(x^2 + 2*x + 5))^2 + 3)
Timed out. \[ \int \frac {4+x}{\left (4+2 x+x^2\right ) \sqrt {5+2 x+x^2}} \, dx=\int \frac {x+4}{\left (x^2+2\,x+4\right )\,\sqrt {x^2+2\,x+5}} \,d x \]